﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@if (Model == null)
{    
    @Html.Partial("~/Views/Shared/_ItemNotFound.cshtml") 
}
else
{  
    <text>
    <h1>
        @Html.Raw(Model.Logo.Exists ? string.Format("<img src='data:image/png;base64,{0}' class='repo-logo' />", Model.Logo.Base64Image) : "")
        @Model.Name
    </h1>
    <div class="pure-menu pure-menu-open pure-menu-horizontal repository-menu">
        <ul>
            <li><a href="@Url.Action("Detail", new { id = ViewBag.ID })" class="detail"><i class="fa fa-hdd-o"></i> @Resources.Repository_Detail_Detail</a></li>
            <li><a href="@Url.Action("Tree", new { id = ViewBag.ID })" class="browser"><i class="fa fa-files-o"></i> @Resources.Repository_Layout_Browse</a></li>
            <li><a href="@Url.Action("Commits", new { id = ViewBag.ID })" class="commits"><i class="fa fa-random"></i> @Resources.Repository_Layout_Commits</a></li>
            <li><a href="@Url.Action("Tags", new { id = ViewBag.ID })" class="tags"><i class="fa fa-tag"></i> @Resources.Repository_Layout_Tags</a></li>
            <li><a href="@Url.Action("Download", new { id = ViewBag.ID })" class="download"><i class="fa fa-download"></i> @Resources.Repository_Tree_Zip</a></li>
            <li><a href="@Url.Action("Clone", new { id = ViewBag.ID })" class="clone"><i class="fa fa-copy"></i> @Resources.Repository_Layout_Clone</a></li>
        </ul> 
    </div>
    </text>
}
@RenderBody()

@section scripts
{
    @RenderSection("scripts", false)
}